import request from "@/utils/request";


//添加接口
export function addEnv(params) {
    return request({
        url: '/env/create',
        method: 'post',
        data: params
    })
}

//获取接口信息
export function getEnv(projectId, id, name, pageIndex, pageSize) {
    return request({
        url: '/env/list',
        method: 'get',
        params: {
            projectId,
            name,
            id,
            pageIndex,
            pageSize
        }

    })
}
//删除接口
export function deleteEnv(id) {
    return request({
        url: `/env/delete/${id}`,
        method: 'delete'
    })
}
//更新接口
export function updateEnv(data) {
    return request({
        url: '/env/update',
        method: 'post',
        data: data
    })
}